package cn.pzhuweb.ssm.controller;

import cn.pzhuweb.ssm.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author KK
 * @create 2022/3/16 20:21
*/
@Controller
public class HomeController {

    @Autowired
    User user;

    @RequestMapping("/hello")
    public String hello(){
        return "index";
    }

    @RequestMapping("/target")
    public String target(Model model){
        model.addAttribute("user",user);
        return "target";
    }
}
